<template>
  <div>
    <div @click="fatherFn">
      <p @click.stop='oneFn'>点击阻止事件冒泡。</p>
      <a
        @click.prevent.stop
        href="http://baidu.com"
      >去百度。</a>
      <p @click.once="twoFn">点击观察事件处理函数执行几次。</p>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    fatherFn () {
      console.log('触发了事件');
    },
    oneFn () {
      console.log('点击了事件');
    },
    twoFn () {
      console.log('我已经点击了啊。');
    }
  }

}
</script>

<style>
</style>